look=0;
for(i=1;i<=100;i++){
	if(i%2==0&&look<=2000){
		look+=i;
	}
}
alert("1-100的偶数和为："+look);


var sum = 0;
var  i = 1; 
while (i<=100){
    if (i%2==0 && sum<=2000){
    sum+=i;
    }
    i++;
}
alert("1-100之间的偶数和:"+sum);


function getSum () {
    var y=90;
    var g=84;
    var m=78;
    var z=m +g +y ;
    alert ("小明的总成绩为："+z);
    
}
getSum();


function min() {
    var min =arguments[0];
    for(var i=0;i<arguments.length; i++){
        if (min>arguments[i]){
            min=arguments[i];
        }
    }
    alert("最小值为："+min);
}
min(1,2,23,-3,15,99,888,33,77);




var num = 0;

function add() {
    for(var i = 0; i < 5; i++) {
        num++;
    }

}


for(var i=1; i<=6;i++){
    for(var h=6-i;h>0;h--){
        document.write("&nbsp;&nbsp;");
    }
    for(var k=0; k<i;k++){
        document.write(k);
    }
    for(var m=i-2; m>=0;m--){
        document.write(m);
    }
    document.write("<br>")

}


function showNum() {
    add();
    alert(num);
}
showNum();

var num=prompt("请输入一个整数",'');
		var a=parseInt(num);
		var jc=1;
			while(a){
			jc *=a;
			  a--;
			}
            document.write(num+"的阶乘为:"+jc);

